% callback routine draw_elastance
% reads parameters from text boxes and sliders
% and draws elastance curves

HandleAxesElastance=findobj(gcf,'Tag','AxesElastance');
set(HandleAxesElastance,'NextPlot','replace');

HandleAxesDelayAV=findobj(gcf,'Tag','AxesDelayAV');
set(HandleAxesDelayAV,'NextPlot','replace');

HandleEditTextHR=findobj(gcf,'Tag','EditTextHR');
HR=str2num(get(HandleEditTextHR,'String'));

HandleEditTextEmaxV=findobj(gcf,'Tag','EditTextEmaxV');
EmaxV=str2num(get(HandleEditTextEmaxV,'String'));

HandleEditTextTEmaxV=findobj(gcf,'Tag','EditTextTEmaxV');
TEmaxV=str2num(get(HandleEditTextTEmaxV,'String'));

HandleEditTextEminV=findobj(gcf,'Tag','EditTextEminV');
EminV=str2num(get(HandleEditTextEminV,'String'));

HandleEditTextVdeadV=findobj(gcf,'Tag','EditTextVdeadV');
VdeadV=str2num(get(HandleEditTextVdeadV,'String'));

HandleEditTextT_interval=findobj(gcf,'Tag','EditTextT_interval');
t_interval=str2num(get(HandleEditTextT_interval,'String'));

HandleEditTextRmv=findobj(gcf,'Tag','EditTextRmv');
Rmv=str2num(get(HandleEditTextRmv,'String'));


loadelastA=4;		% no left atrium

HandleListboxElastanceV=findobj(gcf,'Tag','ListboxElastanceV');
choice_elastV=get(HandleListboxElastanceV,'Value');

switch choice_elastV
  case 1
  loadelastV=1;
  case 2
  loadelastV=2;
  case 3
  loadelastV=3;
end

axes(HandleAxesElastance);
if exist('E_t_LV')
	plot(time,E_t_LV,'y');
end   

set(HandleAxesElastance,'XLim',[0 max(time)]);
set(HandleAxesElastance,'Tag','AxesElastance');
